package com.golxen.framework.common.server.game.sync.message;


import com.golxen.framework.PBPacket.PBPacket;
import com.google.protobuf.GeneratedMessage;

import java.time.LocalDateTime;
import java.util.concurrent.CompletableFuture;

public class SyncResultProcessor {

	private final long sequenceId;

	private LocalDateTime createAt;

	private CompletableFuture<SyncResponse> completableFuture = new CompletableFuture<>();

	private GeneratedMessage.Builder<?> responseBuilder;

	private PBPacket request;

	public SyncResultProcessor(long l) {
		this.sequenceId = l;
		this.createAt = LocalDateTime.now();
	}

	public long getSequenceId() {
		return this.sequenceId;
	}

	public CompletableFuture<SyncResponse> getCompletableFuture() {
		return completableFuture;
	}

	public void setCompletableFuture(CompletableFuture<SyncResponse> completableFuture) {
		this.completableFuture = completableFuture;
	}

	public LocalDateTime getCreateAt() {
		return createAt;
	}

	public void setCreateAt(LocalDateTime createAt) {
		this.createAt = createAt;
	}

	public GeneratedMessage.Builder<?> getResponseBuilder() {
		return responseBuilder;
	}

	public void setResponseBuilder(GeneratedMessage.Builder<?> responseBuilder) {
		this.responseBuilder = responseBuilder;
	}

	public PBPacket getRequest() {
		return request;
	}

	public void setRequest(PBPacket request) {
		this.request = request;
	}

}
